﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ABELGX
{
    public abstract class CarInfo
    {
        public const byte INFO_DRIVER_STATUS = 0x21;
        public const byte INFO_DRIVER_DATA = 0x22;
        public const byte INFO_BATTERY = 0x23;
        public const byte INFO_BATTERY_VOLTAGE = 0x24;
        public const byte INFO_BATTERY_TEMPERATURE = 0x25;
        public const byte INFO_MOTOR = 0x26;
        public const byte INFO_COMMON = 0x27;
        public const byte INFO_AIR_DATA = 0x28;
        public const byte INFO_AIR_STATUS = 0x29;
        public const byte INFO_SENSOR_DATA = 0x2A;
        public const byte INFO_SENSOR_STATUS = 0x2B;
        public const byte INFO_WARNING = 0x2C;
        public const byte INFO_ARM = 0x2E;

        public const byte HEADER0 = 0xAA;
        public const byte HEADER1 = 0x55;

        public List<byte> Funcs { get; } = new List<byte>();
        public CarInfo(params byte[] func)
        {
            Funcs.AddRange(func);
        }
        public abstract void ProcessData(byte[] data, int start);
        public abstract void InitData();
    }
}
